home *** CD-ROM | disk | FTP | other *** search
/ PC Answers 1995 May / PC Answers CD-ROM 7 (Future Publishing) (May 1995).iso / vbits / code / wilmot / topflite / global.bas < prev    next >
Encoding:
BASIC Source File  |  1994-11-30  |  14.2 KB  |  366 lines

  1. Global Const AppName = "NONREV"
  2. Global Const IniName = "NONREV.INI"
  3. Global Const inilen = 60
  4. Global Const MAXFLIGHT = 24
  5.  
  6. ''''' Structures ''''''''''''''''''
  7.  
  8. ''''' info on each flight that we want to glean from mainframe
  9. Type FlightInfo
  10.     flightnumber As Integer
  11.     departing As Integer
  12.     arriving As Integer
  13.     equipment As String
  14.     booked As Single        'total percentage
  15.     fbooked As Single       '1st class percentage
  16.     meal As String
  17.     stops As Integer        '0 = non-stop
  18. End Type
  19. ''''' NOTE:  following is # of above items
  20. Global Const NUMBEROFITEMS = 8     'number of flight items to display per flight
  21.  
  22. ''''' position on form where above info gets plastered
  23. Type InfoPos
  24.     Top As Integer
  25.     Left As Integer
  26.     Bottom As Integer
  27.     Right As Integer
  28. End Type
  29.  
  30. Global Flight(MAXFLIGHT) As FlightInfo
  31. Global Cell(MAXFLIGHT) As InfoPos
  32.  
  33.  
  34. ''''' Airport list stuff '''''''''''''''''''''''''''''''''
  35. Global CityFile As String            'list of airports
  36. Global DefAirportCode As String      'FAA airport code
  37. Global DefDepartIndex As Integer, DefArriveIndex As Integer
  38. Global SourceAirport As String, SourceCity As String
  39. Global DestAirport As String, DestCity As String
  40. Global FlagGoingTo As Integer
  41.  
  42. ''''' Calendar stuff '''''''''''''''''''''''''''''''''''
  43. Global ToDay As Integer
  44. Global TempbColor As Long
  45. Global TempfColor As Long
  46. Global LastClick As Integer
  47. 'Global Datesel As String * 50
  48. Global DayToSelect As Integer
  49. Global MonthValue As Integer, CurrentMonth As Integer, CurrentYear As Integer, YearValue As Integer
  50. Global LastClickDate As Integer
  51. Global Todayed As Integer
  52. Global Init As Integer
  53. Global DaysInMonth(13) As Integer
  54. Global Const MonthString = "January  February March    April    May      June     July     August   SeptemberOctober  November December "
  55. Global Const MnthString = "JanFebMarAprMayJunJulAugSepOctNovDec"
  56.  
  57. ''''' User stuff '''''''''''''''''''''''''''''''''''''''
  58. Global LastName As String
  59. Global FirstName As String
  60. Global Senority As String, Classification As String
  61. Global Sess As String
  62. Global LastDestination As String
  63.  
  64. ''''' other stuff '''''''''''''''''''''''''''''''''''''''
  65. Global TotalFlights As Integer  'total flights actually available on a day
  66.  
  67. ''''' Booleans '''''''''''''''''''''''''''''''''''
  68. Global Const MODAL = 1
  69. Global Const DEBUGON = False
  70.  
  71.  
  72. ''''' Windows Functions ''''''''''''''''''''''''''''
  73. Declare Function GetPrivateProfileInt Lib "Kernel" (ByVal lpApplicationName As String, ByVal lpKeyName As String, ByVal nDefault As Integer, ByVal lpFileName As String) As Integer
  74. Declare Function GetPrivateProfileString Lib "Kernel" (ByVal lpApplicationName As String, ByVal lpKeyName As String, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Integer, ByVal lpFileName As String) As Integer
  75. Declare Function WritePrivateProfileString Lib "Kernel" (ByVal lpApplicationName As String, ByVal lpKeyName As String, ByVal lpString As String, ByVal lplFileName As String) As Integer
  76.  
  77. ''''' CONSTANT.TXT '''''''''''''''''''''''''''''''''
  78. '=================='
  79. '                  '
  80. ' Event parameters '
  81. '                  '
  82. '=================='
  83.  
  84. ' Button and Shift (KeyDown, KeyUp, MouseDown, MouseMove, MouseUp)
  85. Global Const SHIFT_MASK = 1
  86. Global Const CTRL_MASK = 2
  87. Global Const ALT_MASK = 4
  88. Global Const LEFT_BUTTON = 1
  89. Global Const RIGHT_BUTTON = 2
  90. Global Const MIDDLE_BUTTON = 4
  91.  
  92. ' ErrNum (LinkError)
  93. Global Const WRONG_FORMAT = 1
  94. Global Const REQUEST_WITHOUT_INIT = 2
  95. Global Const DDE_WITHOUT_INIT = 3
  96. Global Const ADVISE_WITHOUT_INIT = 4
  97. Global Const POKE_WITHOUT_INIT = 5
  98. Global Const DDE_SERVER_CLOSED = 6
  99. Global Const TOO_MANY_LINKS = 7
  100. Global Const STRING_TOO_LONG = 8
  101. Global Const INVALID_CONTROL_ARRAY_REFERENCE = 9
  102. Global Const UNEXPECTED_DDE = 10
  103. Global Const OUT_OF_MEMORY = 11
  104. Global Const SERVER_ATTEMPTED_CLIENT_OPERATION = 12
  105.  
  106. ' KeyCode (KeyDown, KeyUp)
  107. Global Const KEY_LBUTTON = &H1
  108. Global Const KEY_RBUTTON = &H2
  109. Global Const KEY_CANCEL = &H3
  110. Global Const KEY_MBUTTON = &H4         ' NOT contiguous with L & R BUTTON
  111. Global Const KEY_BACK = &H8
  112. Global Const KEY_TAB = &H9
  113. Global Const KEY_CLEAR = &HC
  114. Global Const KEY_RETURN = &HD
  115. Global Const KEY_SHIFT = &H10
  116. Global Const KEY_CONTROL = &H11
  117. Global Const KEY_MENU = &H12
  118. Global Const KEY_PAUSE = &H13
  119. Global Const KEY_CAPITAL = &H14
  120. Global Const KEY_ESCAPE = &H1B
  121. Global Const KEY_SPACE = &H20
  122. Global Const KEY_PRIOR = &H21
  123. Global Const KEY_NEXT = &H22
  124. Global Const KEY_END = &H23
  125. Global Const KEY_HOME = &H24
  126. Global Const KEY_LEFT = &H25
  127. Global Const KEY_UP = &H26
  128. Global Const KEY_RIGHT = &H27
  129. Global Const KEY_DOWN = &H28
  130. Global Const KEY_SELECT = &H29
  131. Global Const KEY_PRINT = &H2A
  132. Global Const KEY_EXECUTE = &H2B
  133. Global Const KEY_SNAPSHOT = &H2C
  134. Global Const KEY_INSERT = &H2D
  135. Global Const KEY_DELETE = &H2E
  136. Global Const KEY_HELP = &H2F
  137.  
  138. ' KEY_A thru KEY_Z are the same as their ASCII equivalents: 'A' thru 'Z'
  139. ' KEY_0 thru KEY_9 are the same as their ASCII equivalents: '0' thru '9'
  140.  
  141. Global Const KEY_NUMPAD0 = &H60
  142. Global Const KEY_NUMPAD1 = &H61
  143. Global Const KEY_NUMPAD2 = &H62
  144. Global Const KEY_NUMPAD3 = &H63
  145. Global Const KEY_NUMPAD4 = &H64
  146. Global Const KEY_NUMPAD5 = &H65
  147. Global Const KEY_NUMPAD6 = &H66
  148. Global Const KEY_NUMPAD7 = &H67
  149. Global Const KEY_NUMPAD8 = &H68
  150. Global Const KEY_NUMPAD9 = &H69
  151. Global Const KEY_MULTIPLY = &H6A
  152. Global Const KEY_ADD = &H6B
  153. Global Const KEY_SEPARATOR = &H6C
  154. Global Const KEY_SUBTRACT = &H6D
  155. Global Const KEY_DECIMAL = &H6E
  156. Global Const KEY_DIVIDE = &H6F
  157. Global Const KEY_F1 = &H70
  158. Global Const KEY_F2 = &H71
  159. Global Const KEY_F3 = &H72
  160. Global Const KEY_F4 = &H73
  161. Global Const KEY_F5 = &H74
  162. Global Const KEY_F6 = &H75
  163. Global Const KEY_F7 = &H76
  164. Global Const KEY_F8 = &H77
  165. Global Const KEY_F9 = &H78
  166. Global Const KEY_F10 = &H79
  167. Global Const KEY_F11 = &H7A
  168. Global Const KEY_F12 = &H7B
  169. Global Const KEY_F13 = &H7C
  170. Global Const KEY_F14 = &H7D
  171. Global Const KEY_F15 = &H7E
  172. Global Const KEY_F16 = &H7F
  173. Global Const KEY_NUMLOCK = &H90
  174.  
  175. ' State (DragOver)
  176. Global Const ENTER = 0
  177. Global Const LEAVE = 1
  178. Global Const OVER = 2
  179.  
  180. '====================='
  181. '                     '
  182. ' Function parameters '
  183. '                     '
  184. '====================='
  185.  
  186. ' MsgBox parameters
  187. Global Const MB_OK = 0                 ' OK button only
  188. Global Const MB_OKCANCEL = 1           ' OK and Cancel buttons
  189. Global Const MB_ABORTRETRYIGNORE = 2   ' Abort, Retry, and Ignore buttons
  190. Global Const MB_YESNOCANCEL = 3        ' Yes, No, and Cancel buttons
  191. Global Const MB_YESNO = 4              ' Yes and No buttons
  192. Global Const MB_RETRYCANCEL = 5        ' Retry and Cancel buttons
  193.  
  194. Global Const MB_ICONSTOP = 16          ' Critical message
  195. Global Const MB_ICONQUESTION = 32      ' Warning query
  196. Global Const MB_ICONEXCLAMATION = 48   ' Warning message
  197. Global Const MB_ICONINFORMATION = 64   ' Information message
  198.  
  199. Global Const MB_DEFBUTTON1 = 0         ' First button is default
  200. Global Const MB_DEFBUTTON2 = 256       ' Second button is default
  201. Global Const MB_DEFBUTTON3 = 512       ' Third button is default
  202.  
  203. ' MsgBox return values
  204. Global Const IDOK = 1                  ' OK button pressed
  205. Global Const IDCANCEL = 2              ' Cancel button pressed
  206. Global Const IDABORT = 3               ' Abort button pressed
  207. Global Const IDRETRY = 4               ' Retry button pressed
  208. Global Const IDIGNORE = 5              ' Ignore button pressed
  209. Global Const IDYES = 6                 ' Yes button pressed
  210. Global Const IDNO = 7                  ' No button pressed
  211.  
  212.  
  213. '==================='
  214. '                   '
  215. ' Method parameters '
  216. '                   '
  217. '==================='
  218.  
  219. ' Drag (controls)
  220. Global Const CANCEL = 0
  221. Global Const BEGIN_DRAG = 1
  222. Global Const END_DRAG = 2
  223.  
  224. ' GetData, GetFormat, SetData (Clipboard)
  225. Global Const CF_LINK = &HBF00
  226. Global Const CF_TEXT = 1
  227. Global Const CF_BITMAP = 2
  228. Global Const CF_METAFILE = 3
  229. Global Const CF_DIB = 8
  230.  
  231. ' Show (form)
  232. 'Global Const MODAL = 1
  233. Global Const MODELESS = 0
  234.  
  235. '================='
  236. '                 '
  237. ' Property values '
  238. '                 '
  239. '================='
  240.  
  241. ' Alignment (label)
  242. Global Const LEFT_JUSTIFY = 0          ' 0 - Left Justify
  243. Global Const RIGHT_JUSTIFY = 1         ' 1 - Right Justify
  244. Global Const CENTER = 2                ' 2 - Center
  245.  
  246. ' BackColor, ForeColor, FillColor (system colors: form, controls)
  247. Global Const SCROLL_BARS = &H80000000           ' Scroll-bars gray area.
  248. Global Const DESKTOP = &H80000001               ' Desktop.
  249. Global Const ACTIVE_TITLE_BAR = &H80000002      ' Active window caption.
  250. Global Const INACTIVE_TITLE_BAR = &H80000003    ' Inactive window caption.
  251. Global Const MENU_BAR = &H80000004              ' Menu background.
  252. Global Const WINDOW_BACKGROUND = &H80000005     ' Window background.
  253. Global Const WINDOW_FRAME = &H80000006          ' Window frame.
  254. Global Const MENU_TEXT = &H80000007             ' Text in menus.
  255. Global Const WINDOW_TEXT = &H80000008           ' Text in windows.
  256. Global Const TITLE_BAR_TEXT = &H80000009        ' Text in caption, size box, scroll-bar arrow box..
  257. Global Const ACTIVE_BORDER = &H8000000A         ' Active window border.
  258. Global Const INACTIVE_BORDER = &H8000000B       ' Inactive window border.
  259. Global Const APPLICATION_WORKSPACE = &H8000000C ' Background color of multiple document interface (MDI) applications.
  260. Global Const HIGHLIGHT = &H8000000D             ' Items selected item in a control.
  261. Global Const HIGHLIGHT_TEXT = &H8000000E        ' Text of item selected in a control.
  262. Global Const BUTTON_FACE = &H8000000F           ' Face shading on command buttons.
  263. Global Const BUTTON_SHADOW = &H80000010         ' Edge shading on command buttons.
  264. Global Const GRAY_TEXT = &H80000011             ' Grayed (disabled) text.  This color is set to 0 if the current display driver does not support a solid gray color.
  265. Global Const BUTTON_TEXT = &H80000012           ' Text on push buttons.
  266.  
  267. ' BorderStyle (form, label, picture box, text box)
  268. Global Const NONE = 0              ' 0 - None
  269. Global Const FIXED_SINGLE = 1          ' 1 - Fixed Single
  270. Global Const SIZABLE = 2           ' 2 - Sizable (Forms only)
  271. Global Const FIXED_DOUBLE = 3          ' 3 - Fixed Double (Forms only)
  272.  
  273. ' DragMode (controls)
  274. Global Const MANUAL = 0                ' 0 - Manual
  275. Global Const AUTOMATIC = 1             ' 1 - Automatic
  276.  
  277. ' DrawMode (form, picture box, Printer)
  278. Global Const BLACKNESS = 1             ' 1 - Blackness
  279. Global Const NOT_MERGE_PEN = 2         ' 2 - Not Merge Pen
  280. Global Const MASK_NOT_PEN = 3          ' 3 - Mask Not Pen
  281. Global Const NOT_COPY_PEN = 4          ' 4 - Not Copy Pen
  282. Global Const MASK_PEN_NOT = 5          ' 5 - Mask Pen Not
  283. Global Const INVERT = 6                ' 6 - Invert
  284. Global Const XOR_PEN = 7               ' 7 - Xor Pen
  285. Global Const NOT_MASK_PEN = 8          ' 8 - Not Mask Pen
  286. Global Const MASK_PEN = 9              ' 9 - Mask Pen
  287. Global Const NOT_XOR_PEN = 10          ' 10 - Not Xor Pen
  288. Global Const NOP = 11                  ' 11 - Nop
  289. Global Const MERGE_NOT_PEN = 12        ' 12 - Merge Not Pen
  290. Global Const COPY_PEN = 13             ' 13 - Copy Pen
  291. Global Const MERGE_PEN_NOT = 14        ' 14 - Merge Pen Not
  292. Global Const MERGE_PEN = 15            ' 15 - Merge Pen
  293. Global Const WHITENESS = 16            ' 16 - Whiteness
  294.  
  295. ' DrawStyle (form, picture box, Printer)
  296. Global Const SOLID = 0                 ' 0 - Solid
  297. Global Const DASH = 1                  ' 1 - Dash
  298. Global Const DOT = 2                   ' 2 - Dot
  299. Global Const DASH_DOT = 3              ' 3 - Dash-Dot
  300. Global Const DASH_DOT_DOT = 4          ' 4 - Dash-Dot-Dot
  301. Global Const INVISIBLE = 5             ' 5 - Invisible
  302. Global Const INSIDE_SOLID = 6          ' 6 - Inside Solid
  303.  
  304. ' FillStyle (form, picture box, Printer)
  305. ' Global Const SOLID = 0               ' 0 - Solid
  306. Global Const TRANSPARENT = 1           ' 1 - Transparent
  307. Global Const HORIZONTAL_LINE = 2       ' 2 - Horizontal Line
  308. Global Const VERTICAL_LINE = 3         ' 3 - Vertical Line
  309. Global Const UPWARD_DIAGONAL = 4       ' 4 - Upward Diagonal
  310. Global Const DOWNWARD_DIAGONAL = 5     ' 5 - Downward Diagonal
  311. Global Const CROSS = 6                 ' 6 - Cross
  312. Global Const DIAGONAL_CROSS = 7        ' 7 - Diagonal Cross
  313.  
  314. ' LinkMode (controls)
  315. ' Global Const NONE = 0                ' 0 - None
  316. Global Const HOT = 1                   ' 1 - Hot
  317. Global Const COLD = 2                  ' 2 - Cold
  318.  
  319. ' LinkMode (form)
  320. ' Global Const NONE = 0                ' 0 - None
  321. Global Const SERVER = 1                ' 1 - Server
  322.  
  323. ' MousePointer (form, controls)
  324. Global Const DEFAULT = 0           ' 0 - Default
  325. Global Const ARROW = 1             ' 1 - Arrow
  326. Global Const CROSSHAIR = 2         ' 2 - Cross
  327. Global Const IBEAM = 3             ' 3 - I-Beam
  328. Global Const ICON_POINTER = 4          ' 4 - Icon
  329. Global Const SIZE_POINTER = 5          ' 5 - Size
  330. Global Const SIZE_NE_SW = 6        ' 6 - Size NE SW
  331. Global Const SIZE_N_S = 7          ' 7 - Size N S
  332. Global Const SIZE_NW_SE = 8        ' 8 - Size NW SE
  333. Global Const SIZE_W_E = 9          ' 9 - Size W E
  334. Global Const UP_ARROW = 10         ' 10 - Up Arrow
  335. Global Const HOURGLASS = 11        ' 11 - Hourglass
  336. Global Const NO_DROP = 12              ' 12 - No drop
  337.  
  338. ' ScaleMode (form, picture box, Printer)
  339. Global Const USER = 0                  ' 0 - User
  340. Global Const TWIPS = 1                 ' 1 - Twip
  341. Global Const POINTS = 2                ' 2 - Point
  342. Global Const PIXELS = 3                ' 3 - Pixel
  343. Global Const CHARACTERS = 4            ' 4 - Character
  344. Global Const INCHES = 5                ' 5 - Inch
  345. Global Const MILLIMETERS = 6           ' 6 - Millimeter
  346. Global Const CENTIMETERS = 7           ' 7 - Centimeter
  347.  
  348. ' ScrollBar (text box)
  349. ' Global Const NONE = 0                ' 0 - None
  350. Global Const HORIZONTAL = 1            ' 1 - Horizontal
  351. Global Const VERTICAL = 2              ' 2 - Vertical
  352. Global Const BOTH = 3                  ' 3 - Both
  353.  
  354. ' Value (check box)
  355. Global Const UNCHECKED = 0             ' 0 - Unchecked
  356. Global Const CHECKED = 1               ' 1 - Checked
  357. Global Const GRAYED = 2                ' 2 - Grayed
  358.  
  359. ' WindowState (form)
  360. Global Const NORMAL = 0                ' 0 - Normal
  361. Global Const MINIMIZED = 1             ' 1 - Minimized
  362. Global Const MAXIMIZED = 2             ' 2 - Maximized
  363.  
  364.  
  365.  
  366.